<include target="header.include.html" />

<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
	<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>

<form action="./" method="post" ruleset="insertQuestion" id="fo_kin_write_question" class="writeForm">
<input type="hidden" name="act" value="procKinInsert" />
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />
<input type="hidden" name="content" value="{$oDocument->getContentText()}" />
<input type="hidden" name="enable_category" value="N" />

    <h3>{$lang->cmd_ask}</h3>

    <table border="1" cellspacing="0">
    <tr cond="$module_info->use_category=='Y'">
		<input type="hidden" name="enable_category" value="Y" />
        <th scope="row" style='width:9%'>{$lang->ask_category}</th>
        <td>
            <select name="category_srl" class="category">
                <option value="">{$lang->category}</option>
                <option loop="$categories => $val" value="{$val->category_srl}" selected="selected"|cond="$val->selected||$val->category_srl==$oDocument->get('category_srl')">
                    {str_repeat("&nbsp;&nbsp;",$val->depth)} {$val->title} ({$val->document_count})
                </option>
            </select>
        </td>
    </tr>

    <tr>
        <th scope="row">{$lang->title}</th>
        <td class="title"><input type="text" name="title" class="title" value="{htmlspecialchars($oDocument->get('title'))}" /></td>
    </tr>
    </table>

    <div class="editor">
        {$oDocument->getEditor()}
    </div>

    <table border="1" cellspacing="0">
    <tr>
        <th scope="row" style='width:9%'>{$lang->give_point}</th>
        <td>
            <strong cond="$oDocument->isExists()">{number_format($oDocument->get('point'))} {$point_name}</strong>
            <input cond="!$oDocument->isExists()" type="text" name="give_point" value="{$max_point}" class="givePoint" /> /{number_format($limit_point)} {$point_name}
            <p>{sprintf($lang->about_give_point, $min_point, $limit_point)}</p></td>
        </td>
    </tr>
    </table>

    <div class="buttonArea">
        <span class="button strong black"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
        <span class="button"><button type="button" onclick="location.href='{getUrl('act','','title','')}';return false;">{$lang->cmd_back}</button></span>
    </div>

</form>

<include target="footer.include.html" />

